{__NOLAYOUT__}
<div toplayer="1" class="wrap-box wrap-pb2 " id="<?php echo $funcid;?>" summaryid="Chain" baseurl="<?php echo U('Chain/index'); ?>">

   <div class="wrap-box-info ">
      <div class="wrap-title abe-ofl">
         <div class="tit abe-fl">交易链</div>
         <div class="abe-fr">


               <a href="javascript:void(0);"  class=" vi-blue " onclick="return _asr.openLink('','<?php echo "$funcid"; ?>','刷新',1); "><i class="iconfont ">&#xe611;</i> 刷新</a>

         </div>
      </div>

      <div class="order-step">
         <dl>
            <?php if(is_array($step)):
                 $i = 0;
                 $__LIST__ = $step;
                 if( count($__LIST__) == 0) :
                     echo "";
                 else:
                     foreach($__LIST__ as $key=>$item):
                        if($key>0): ?>
                        <dd <?php if($item['type']=='after') echo "class='after'"; elseif ($item['type']=='current') echo "class='current'"; elseif ($item['type']=='cancel') echo "class='cancel-faq'"; ?>><i class="iconfont">&#xe619;</i></dd>
                        <?php endif; ?>
                        <dt <?php if($item['type']=='after') echo "class='after'"; elseif ($item['type']=='current') echo "class='current'"; elseif ($item['type']=='cancel') echo "class='cancel-faq'"; ?>>
                           <div <?php if($item['type']=='cancel') echo "class='iconfont'"; ?> ><?php echo $item['no'];?></div>
                           <span><?php echo $item['desc'];?></span>
                           <time><?php echo $item['time'];?></time>
                        </dt>
                    <?php endforeach;
                 endif;
               endif; ?>
           </dl>
      </div>

      <div class="table-box">
         <div class="table-in">
            <div class="pub-par-title ppt-ico-box">
               <span class="abe-fl vi-blue abe-ft14">基本信息</span>
               <div class="faq-ico-box abe-fl">
                  <!-- icon 图标样例 -->
                    <?php if($search[status]=='0'): ?><div class="faq-ico"><img src="/Public/images/Home/faq-caogao.png" alt=""></div><?php endif; ?>
                    <?php if($search[status]=='2'): ?><div class="faq-ico"><img src="/Public/images/Home/faq-close.png" alt=""></div><?php endif; ?>
                    <?php if($search[status]=='7'): ?><div class="faq-ico"><img src="/Public/images/Home/faq-zuofei.png" alt=""></div><?php endif; ?>
<!--
                  <?php if($search["is_manual"]==1): ?><div class="faq-ico"><img src="/Public/images/Home/faq-shou.png" alt=""></div><?php endif; ?>
                  <?php if($search["is_split"]==1): ?><div class="faq-ico"><img src="/Public/images/Home/faq-chai.png" alt=""></div><?php endif; ?>
                  <?php if($search["is_copy"]==1): ?><div class="faq-ico"><img src="/Public/images/Home/faq-copy.png" alt=""></div><?php endif; ?>
                  <?php if($search["status"]==0): ?><div class="faq-ico"><img src="/Public/images/Home/faq-gua.png" alt=""></div><?php endif; ?>
                  <?php if($search["lock_status"]==1): ?><div class="faq-ico"><img src="/Public/images/Home/faq-suo.png" alt=""></div><?php endif; ?>
                  <?php if($search["confirm_order"]==1 && $search["confirm_status"]==1): ?><div class="faq-ico"><img src="/Public/images/Home/faq-shen.png" alt=""></div><?php endif; ?>
                  <?php if($search["confirm_order"]==1 && $search["confirm_status"]==0): ?><div class="faq-ico"><img src="/Public/images/Home/faq-wen.png" alt=""></div><?php endif; ?>
                  <?php if($search["cancel_status"]==1): ?><div class="faq-ico"><img src="/Public/images/Home/faq-zuofei.png" alt=""></div><?php endif; ?>
                  <?php if($search["assign_result"]==2 || $search["assign_result"]==3): ?><div class="faq-ico"><img src="/Public/images/Home/faq-que.png" alt=""></div><?php endif; ?>
                  <?php if($search["payment_status"]==0): ?><div class="faq-ico faq-ico-wfk"><img src="/Public/images/Home/wfk.png" alt=""></div><?php endif; ?> -->
               </div>
               <div class="abe-fr">


          <?php if (isset($rights['edit_base']) && $rights['edit_base']): ?>
          <?php if ($search['status']==0): ?>
               <a href="javascript:void(0);"  class=" vi-blue vi-blue mlg_10 " onclick="return _asr.popupFun('<?php echo U("/Home/Chain/index?func=edit_base&id=$search[id]") ; ?>', '<?php echo filterFuncId("/Home/Chain/index?func=edit_base&id=$search[id]","");?>'); "> 编辑</a>
          <?php endif; ?>
          <?php endif; ?>

               </div>
            </div>

     <table border="0" cellspacing="0" cellpadding="0" class="pub-table-par">
        <colgroup>
           <col style="width:8%;"/>
           <col style="width:17%;"/>
           <col style="width:8%;"/>
           <col style="width:17%;"/>
           <col style="width:8%;"/>
           <col style="width:17%;"/>
           <col style="width:8%;"/>
           <col style="width:16%;"/>
        </colgroup>
        <tbody>

           <tr class= "even">
             <th>交易链号</th>
             <td><a href="javascript:void(0);" class="vi-blue"  onclick="return _asr.openLink('<?php echo U("/Home/Chain/index?func=view&id=$search[id]"); ?>','<?php echo filterFuncId( U("/Home/Chain/index?func=view&id=$search[id]") ,"");?>', '交易链详情' ,0); " ><?php echo $search["chain_no"]; ?></a></td>
             <th>库联</th>
             <td><?php echo get_table_Org_byID("$search[org_id]","name","") ; ?></td>
             <th>交易标题</th>
             <td><?php echo $search["subject"]; ?></td>
             <th>货品编码</th>
             <td><?php echo $search["goods_no"]; ?><em class="abe-space-sm"></em></td>
           </tr>
           <tr class= "odd">
             <th>货品名称</th>
             <td><?php echo $search["goods_name"]; ?></td>
             <th>材质</th>
             <td><?php echo $search["materials"]; ?></td>
             <th>重量</th>
             <td><?php echo system_format("F33", $search["weight"],1); ?></td>
             <th>重量单位</th>
             <td><?php echo $search["uom_weight"]; ?></td>
           </tr>
           <tr class= "even">
             <th>明细</th>
             <td><?php echo system_format("N3", $search["detail"],1); ?></td>
             <th>仓库接口</th>
             <td><?php echo get_table_Chain_interface_status("$search[interface_status]","name","") ; ?><em class="abe-space-sm"></em><?php echo system_format("DT", $search["interface_time"],1); ?></td>
             <th>接口处理</th>
             <td><?php echo get_table_Chain_interface_process("$search[interface_process]","name","") ; ?></td>
             <th>接口信息</th>
             <td title="<?php echo $search["interface_result"]; ?>"><?php echo OverView($search["interface_result"],150,"..."); ?></td>
           </tr>
           <tr class= "odd">
             <th>备注</th>
             <td title="<?php echo $search["remarks"]; ?>"><?php echo OverView($search["remarks"],150,"..."); ?></td>
             <th>状态</th>
             <td><?php echo get_table_Chain_status("$search[status]","name","") ; ?></td>
             <th></th>
             <td></td>
             <th></th>
             <td></td>
           </tr>

        </tbody>
     </table>
         </div>
      </div>





       <div class="table-box">
         <div class="table-in">
            <form action="<?php echo U('Chain/index?func=view'); ?>" id="<?php echo "$funcid"; ?>-Search" method="get">
                <input type="hidden" name="<?php echo "$funcid"; ?>-last-url" id="<?php echo "$funcid"; ?>-last-url" value="<?php echo $__last_url; ?>" />
                <input type="hidden" name="funcid" value="<?php echo "$funcid"; ?>" />
                <input type="hidden" name="pfuncid" value="<?php echo "$pfuncid"; ?>" />
                <input type="hidden" name="id" value="<?php echo $search["id"]; ?>" />
                <input type="hidden" name="_lastchanged" value="<?php echo $search["lastchanged"]; ?>" />


                <input type="hidden" name="_tab" value="<?php echo $search["_tab"]; ?>" />

                <input type="hidden" name="_tab_mingxi_p" value="<?php echo $search["_tab_mingxi_p"]; ?>" />
                <input type="hidden" name="_tab_mingxi_psize" value="<?php echo $search["_tab_mingxi_psize"]; ?>" />
                <input type="hidden" name="_tab_jiaoyikaidan_p" value="<?php echo $search["_tab_jiaoyikaidan_p"]; ?>" />
                <input type="hidden" name="_tab_jiaoyikaidan_psize" value="<?php echo $search["_tab_jiaoyikaidan_psize"]; ?>" />
                <input type="hidden" name="_tab_jiaoyilianrizhi_p" value="<?php echo $search["_tab_jiaoyilianrizhi_p"]; ?>" />
                <input type="hidden" name="_tab_jiaoyilianrizhi_psize" value="<?php echo $search["_tab_jiaoyilianrizhi_psize"]; ?>" />

                  <!--表单-->
                  <div class="order-det-ptab">
                    <div class="od-info abe-fl" >
                      <a href="#" onclick="return _asr.tabsheet('<?php echo $funcid;?>', '<?php echo "$funcid"; ?>-Search', 'mingxi');" <?php if($search['_tab'] == 'mingxi'): ?> class="current"<?php endif;?>>明细</a>
                      <a href="#" onclick="return _asr.tabsheet('<?php echo $funcid;?>', '<?php echo "$funcid"; ?>-Search', 'jiaoyikaidan');" <?php if($search['_tab'] == 'jiaoyikaidan'): ?> class="current"<?php endif;?>>交易开单</a>
                      <a href="#" onclick="return _asr.tabsheet('<?php echo $funcid;?>', '<?php echo "$funcid"; ?>-Search', 'jiaoyilianrizhi');" <?php if($search['_tab'] == 'jiaoyilianrizhi'): ?> class="current"<?php endif;?>>交易链日志</a>
                    </div>

              <div class="abe-fl screening pbtab-search pbtab-col2">
<!-- 搜索关闭状态，按需要打开
                 <ul class="form form-mod-new">

                 </ul>

搜索关闭状态，按需要打开 -->

              </div>

              <div class="abe-fr">
              </div>
            </div>
          </form>
        </div>
      </div>



              <?php if ($search['_tab']=='mingxi'): ?>
                <div class="table-box">
                  <div class="table-in">
                    <form id="<?php echo "$funcid"; ?>-Result"  action="<?php U('Chain/op'); ?>" method="post">
                      <input type="hidden" name="<?php echo "$funcid"; ?>-last-url" id="<?php echo "$funcid"; ?>-last-url" value="<?php echo $__last_url; ?>" />
                      <input type="hidden" name="funcid" value="<?php echo "$funcid"; ?>" />
                      <input type="hidden" name="pfuncid" value="<?php echo "$pfuncid"; ?>" />
                      <input type="hidden" name="id" value="<?php echo $search["id"]; ?>" />
                      <input type="hidden" name="_lastchanged" value="<?php echo $search["lastchanged"]; ?>" />
                      <table border="0" cellspacing="0" cellpadding="0" class="pub-table-par pub-table-par-tdc pub-t-faq">
                        <colgroup>
                          <col style="width: 40px ;"> <!--  -->
                          <col style="width: 60px ;"> <!-- 操作 -->
                          <col style="width: 80px ;"> <!-- 库联 -->
                          <col style="width: 100px ;"> <!-- 卖出客户 -->
                          <col style="width: 100px ;"> <!-- 买入客户 -->
                          <col style="width: 80px ;"> <!-- 接口处理 -->
                          <col style="width: 150px ;"> <!-- 接口时间 -->
                          <col style="width: 100px ;"> <!-- 接口信息 -->
                          <col style="width: auto" >
                        </colgroup>
                        <tbody>
                          <tr>
                            <th><input type="checkbox"  onclick="_asr.selectAll(this);"> &nbsp;#</th>
                            <th>操作</th>
                            <th>库联</th>
                            <th class="abe-txtl">卖出客户</th>
                            <th class="abe-txtl">买入客户</th>
                            <th>接口处理</th>
                            <th>接口时间</th>
                            <th class="abe-txtl">接口信息</th>
                           <th></th >
                          </tr>
                          <?php if(is_array($list)):
                            $i = 0;
                            $__LIST__ = $list;
                            if( count($__LIST__) == 0) :
                                echo "";
                            else:
                                foreach($__LIST__ as $key=>$master): $mod = ($i % 2 );++$i; ?>
                                  <tr <?php if($mod == "1"): ?>class="even"<?php endif; if($mod == "0"): ?>class="odd"<?php endif; ?>>
                                    <!-- 选择 -->
                                    <td><input type="checkbox" name="Key[]" data-type="select" onclick="_asr.selectMulit(this);" value="<?php echo $master['id'] ;?>">&nbsp; <?php echo $i + ($page_size * ($p - 1)); ?></td>
                                    <td>
                            <div class="faq-icon">


          <?php if (isset($rights['master_view']) && $rights['master_view']): ?>
               <a href="javascript:void(0);"  class=" vi-blue vi-blue " onclick="return _asr.openLink('<?php echo U("/Home/Chain/index?func=view&id=$master[id]") ; ?>', '<?php echo filterFuncId(U("/Home/Chain/index?func=view&id=$master[id]"),"");?>' , '交易链' ,0); "><i class="iconfont abe-ft18">&#xe62e;</i></a>
          <?php endif; ?>



          <?php if (isset($rights['master_edit']) && $rights['master_edit']): ?>
          <?php if ($master[status]==0): ?>
               <a href="javascript:void(0);"  class=" vi-blue vi-blue " onclick="return _asr.popupFun('<?php echo U("/Home/Chain/index?func=edit&id=$master[id]") ; ?>', '<?php echo filterFuncId("/Home/Chain/index?func=edit&id=$master[id]","");?>'); "><i class="iconfont abe-ft15">&#xe63f;</i></a>
          <?php endif; ?>
          <?php endif; ?>



          <?php if (isset($rights['master_delete']) && $rights['master_delete']): ?>
          <?php if ($master[status]==0): ?>
               <a href="javascript:void(0);"  class=" vi-blue vi-blue " onclick="return _asr.confirm('确认操作', '请确认是否删除交易链?', '<?php echo "交易链 : $master[chain_no]"; ?>', '<?php echo U("/Home/Chain/index?func=delete&type=1&id=$master[id]") ; ?>','',''); "><i class="iconfont vi-red">&#xe61d;</i></a>
          <?php endif; ?>
          <?php endif; ?>

                            </div></td>
                                    <td><?php echo get_table_Org_byID("$master[org_id]","name","") ; ?></td>
                                    <td  class=" abe-txtl "><?php echo $master["customer_name"] ; ?></td>
                                    <td  class=" abe-txtl "><?php echo $master["buyer_name"] ; ?></td>
                                    <td><?php echo get_table_ChainDetail_interface_process("$master[interface_process]","name","") ; ?></td>
                                    <td><?php echo system_format("DT", $master["interface_time"],1) ; ?></td>
                                    <td  class=" abe-txtl "><div class="newline"><?php echo OverView($master["interface_result"],150,"...") ; ?></div></td>
                                 <td></td>
                                  </tr>
                                  <?php endforeach; ?>
                                <?php
                            endif;
                        else:
                            echo ""
                        ;endif; ?>
                        </tbody>
                      </table>
                    </form>
                  </div>
                </div>
              <?php endif; ?>

              <?php if ($search['_tab']=='jiaoyikaidan'): ?>
                <div class="table-box">
                  <div class="table-in">
                    <form id="<?php echo "$funcid"; ?>-Result"  action="<?php U('Chain/op'); ?>" method="post">
                      <input type="hidden" name="<?php echo "$funcid"; ?>-last-url" id="<?php echo "$funcid"; ?>-last-url" value="<?php echo $__last_url; ?>" />
                      <input type="hidden" name="funcid" value="<?php echo "$funcid"; ?>" />
                      <input type="hidden" name="pfuncid" value="<?php echo "$pfuncid"; ?>" />
                      <input type="hidden" name="id" value="<?php echo $search["id"]; ?>" />
                      <input type="hidden" name="_lastchanged" value="<?php echo $search["lastchanged"]; ?>" />
                      <table border="0" cellspacing="0" cellpadding="0" class="pub-table-par pub-table-par-tdc pub-t-faq">
                        <colgroup>
                          <col style="width: 40px ;"> <!-- 序号 -->
                          <col style="width: 80px ;"> <!-- 状态 -->
                          <col style="width: 80px ;"> <!-- 库联 -->
                          <col style="width: 80px ;"> <!-- 仓库编码 -->
                          <col style="width: 100px ;"> <!-- 卖出客户 -->
                          <col style="width: 100px ;"> <!-- 买入客户 -->
                          <col style="width: 80px ;"> <!-- 交易单号 -->
                          <col style="width: 80px ;"> <!-- 交易类型 -->
                          <col style="width: 80px ;"> <!-- 开单日期 -->
                          <col style="width: 80px ;"> <!-- 合同号码 -->
                          <col style="width: 80px ;"> <!-- 合同日期 -->
                          <col style="width: 80px ;"> <!-- 实物 -->
                          <col style="width: 100px ;"> <!-- 货品名称 -->
                          <col style="width: 100px ;"> <!-- 规格 -->
                          <col style="width: 80px ;"> <!-- 材质 -->
                          <col style="width: 80px ;"> <!-- 商标 -->
                          <col style="width: 80px ;"> <!-- 产地 -->
                          <col style="width: 80px ;"> <!-- 交易重量 -->
                          <col style="width: 100px ;"> <!-- 交易价格(元) -->
                          <col style="width: 100px ;"> <!-- 交易金额(元) -->
                          <col style="width: 80px ;"> <!-- 重量单位 -->
                          <col style="width: 80px ;"> <!-- 数量单位 -->
                          <col style="width: 80px ;"> <!-- 卖家确认 -->
                          <col style="width: 150px ;"> <!-- 卖家确认时间 -->
                          <col style="width: 100px ;"> <!-- 卖家确认人员 -->
                          <col style="width: 80px ;"> <!-- 买家确认 -->
                          <col style="width: 150px ;"> <!-- 买家确认时间 -->
                          <col style="width: 100px ;"> <!-- 买家确认人员 -->
                          <col style="width: 80px ;"> <!-- 卖家发送 -->
                          <col style="width: 150px ;"> <!-- 卖家发送时间 -->
                          <col style="width: 100px ;"> <!-- 卖家发送人员 -->
                          <col style="width: 80px ;"> <!-- 仓储费承担 -->
                          <col style="width: 120px ;"> <!-- 仓储费起始(天) -->
                          <col style="width: 150px ;"> <!-- 仓储费起算日 -->
                          <col style="width: 100px ;"> <!-- 付款截至类型 -->
                          <col style="width: 150px ;"> <!-- 付款截至时间 -->
                          <col style="width: 80px ;"> <!-- 收付款登记 -->
                          <col style="width: 100px ;"> <!-- 买家付款(元) -->
                          <col style="width: 80px ;"> <!-- 卖家收款 -->
                          <col style="width: 80px ;"> <!-- 提单号码 -->
                          <col style="width: 80px ;"> <!-- 提单日期 -->
                          <col style="width: 150px ;"> <!-- 提单截至 -->
                          <col style="width: 100px ;"> <!-- 提货公司 -->
                          <col style="width: 100px ;"> <!-- 提货车辆信息 -->
                          <col style="width: 80px ;"> <!-- 发货方式 -->
                          <col style="width: 100px ;"> <!-- 发货要求 -->
                          <col style="width: 80px ;"> <!-- 配货标志 -->
                          <col style="width: 150px ;"> <!-- 配货时间 -->
                          <col style="width: 80px ;"> <!-- 配货人员 -->
                          <col style="width: 80px ;"> <!-- 配货重量 -->
                          <col style="width: 80px ;"> <!-- 配货数量 -->
                          <col style="width: 80px ;"> <!-- 收货卡号 -->
                          <col style="width: 80px ;"> <!-- 追加许可 -->
                          <col style="width: 80px ;"> <!-- 实发重量 -->
                          <col style="width: 80px ;"> <!-- 实发数量 -->
                          <col style="width: 150px ;"> <!-- 实发时间 -->
                          <col style="width: 80px ;"> <!-- 实发单号 -->
                          <col style="width: 80px ;"> <!-- 重量差异 -->
                          <col style="width: 100px ;"> <!-- 差异金额(元) -->
                          <col style="width: 80px ;"> <!-- 接口状态 -->
                          <col style="width: 80px ;"> <!-- 接口处理 -->
                          <col style="width: 150px ;"> <!-- 接口发送时间 -->
                          <col style="width: 100px ;"> <!-- 接口发送次数 -->
                          <col style="width: 150px ;"> <!-- 接口返回时间 -->
                          <col style="width: 100px ;"> <!-- 接口信息 -->
                          <col style="width: 100px ;"> <!-- 卖家消息 -->
                          <col style="width: 100px ;"> <!-- 买家消息 -->
                          <col style="width: 100px ;"> <!-- 备注 -->
                          <col style="width: 150px ;"> <!-- 创建时间 -->
                          <col style="width: 150px ;"> <!-- 修改时间 -->
                          <col style="width: auto" >
                        </colgroup>
                        <tbody>
                          <tr>
                            <th>序号</th>
                            <th>状态</th>
                            <th>库联</th>
                            <th class="abe-txtl">仓库编码</th>
                            <th class="abe-txtl">卖出客户</th>
                            <th class="abe-txtl">买入客户</th>
                            <th class="abe-txtl">交易单号</th>
                            <th>交易类型</th>
                            <th>开单日期</th>
                            <th class="abe-txtl">合同号码</th>
                            <th>合同日期</th>
                            <th>实物</th>
                            <th class="abe-txtl">货品名称</th>
                            <th class="abe-txtl">规格</th>
                            <th class="abe-txtl">材质</th>
                            <th class="abe-txtl">商标</th>
                            <th class="abe-txtl">产地</th>
                            <th class="abe-txtr">交易重量</th>
                            <th class="abe-txtr">交易价格(元)</th>
                            <th class="abe-txtr">交易金额(元)</th>
                            <th>重量单位</th>
                            <th>数量单位</th>
                            <th>卖家确认</th>
                            <th>卖家确认时间</th>
                            <th>卖家确认人员</th>
                            <th>买家确认</th>
                            <th>买家确认时间</th>
                            <th>买家确认人员</th>
                            <th>卖家发送</th>
                            <th>卖家发送时间</th>
                            <th>卖家发送人员</th>
                            <th>仓储费承担</th>
                            <th>仓储费起始(天)</th>
                            <th>仓储费起算日</th>
                            <th>付款截至类型</th>
                            <th>付款截至时间</th>
                            <th>收付款登记</th>
                            <th class="abe-txtr">买家付款(元)</th>
                            <th class="abe-txtr">卖家收款</th>
                            <th class="abe-txtl">提单号码</th>
                            <th>提单日期</th>
                            <th>提单截至</th>
                            <th class="abe-txtl">提货公司</th>
                            <th class="abe-txtl">提货车辆信息</th>
                            <th>发货方式</th>
                            <th class="abe-txtl">发货要求</th>
                            <th>配货标志</th>
                            <th>配货时间</th>
                            <th>配货人员</th>
                            <th class="abe-txtr">配货重量</th>
                            <th class="abe-txtr">配货数量</th>
                            <th class="abe-txtl">收货卡号</th>
                            <th>追加许可</th>
                            <th class="abe-txtr">实发重量</th>
                            <th class="abe-txtr">实发数量</th>
                            <th>实发时间</th>
                            <th>实发单号</th>
                            <th class="abe-txtr">重量差异</th>
                            <th class="abe-txtr">差异金额(元)</th>
                            <th>接口状态</th>
                            <th>接口处理</th>
                            <th>接口发送时间</th>
                            <th>接口发送次数</th>
                            <th>接口返回时间</th>
                            <th class="abe-txtl">接口信息</th>
                            <th class="abe-txtl">卖家消息</th>
                            <th class="abe-txtl">买家消息</th>
                            <th class="abe-txtl">备注</th>
                            <th>创建时间</th>
                            <th>修改时间</th>
                           <th></th >
                          </tr>
                          <?php if(is_array($list)):
                            $i = 0;
                            $__LIST__ = $list;
                            if( count($__LIST__) == 0) :
                                echo "";
                            else:
                                foreach($__LIST__ as $key=>$master): $mod = ($i % 2 );++$i; ?>
                                  <tr <?php if($mod == "1"): ?>class="even"<?php endif; if($mod == "0"): ?>class="odd"<?php endif; ?>>
                                    <td><?php echo $i + ($page_size * ($p - 1)); ?></td>
                                    <td><?php echo get_table_Trade_status("$master[status]","name","") ; ?></td>
                                    <td><?php echo get_table_Org_byID("$master[org_id]","name","") ; ?></td>
                                    <td  class=" abe-txtl "><?php echo get_table_Warehouse("$master[warehouse_code]","name","") ; ?></td>
                                    <td  class=" abe-txtl "><?php echo $master["customer_name"] ; ?></td>
                                    <td  class=" abe-txtl "><?php echo $master["buyer_name"] ; ?></td>
                                    <td  class=" abe-txtl "><a href="javascript:void(0);" class="vi-blue"  onclick="return _asr.openLink('<?php echo U("/Home/Trade/index?func=view&id=$master[id]"); ?>','<?php echo filterFuncId( U("/Home/Trade/index?func=view&id=$master[id]") ,"");?>', '<?php echo tabTitle("交易","$master[trade_no]","RIGHT","8") ; ?>' ,0); " ><?php echo $master["trade_no"] ; ?></a></td>
                                    <td><?php echo get_table_Trade_tx_type("$master[tx_type]","name","") ; ?></td>
                                    <td><?php echo system_format("D", $master["tx_date"],1) ; ?></td>
                                    <td  class=" abe-txtl "><?php echo $master["contract_no"] ; ?></td>
                                    <td><?php echo system_format("D", $master["contract_date"],1) ; ?></td>
                                    <td><?php echo get_table_Trade_is_real("$master[is_real]","name","") ; ?></td>
                                    <td  class=" abe-txtl "><?php echo $master["goods_name"] ; ?></td>
                                    <td  class=" abe-txtl "><?php echo $master["style_info"] ; ?></td>
                                    <td  class=" abe-txtl "><?php echo $master["materials"] ; ?></td>
                                    <td  class=" abe-txtl "><?php echo $master["brand"] ; ?></td>
                                    <td  class=" abe-txtl "><?php echo $master["producing_area"] ; ?></td>
                                    <td  class=" abe-txtr "><?php echo system_format("F33", $master["weight"],1) ; ?></td>
                                    <td  class=" abe-txtr "><?php echo system_format("F33", $master["price"],1) ; ?></td>
                                    <td  class=" abe-txtr "><?php echo system_format("F32", $master["amount"],1) ; ?></td>
                                    <td><?php echo $master["uom_weight"] ; ?></td>
                                    <td><?php echo $master["uom_qty"] ; ?></td>
                                    <td><?php echo get_table_Trade_cust_confirm_status("$master[cust_confirm_status]","name","") ; ?></td>
                                    <td><?php echo system_format("DT", $master["cust_confirm_time"],1) ; ?></td>
                                    <td><?php echo $master["cust_confirm_user"] ; ?></td>
                                    <td><?php echo get_table_Trade_buyer_confirm_status("$master[buyer_confirm_status]","name","") ; ?></td>
                                    <td><?php echo system_format("DT", $master["buyer_confirm_time"],1) ; ?></td>
                                    <td><?php echo $master["buyer_confirm_user"] ; ?></td>
                                    <td><?php echo get_table_Trade_cust_send_type("$master[cust_send_type]","name","") ; ?></td>
                                    <td><?php echo system_format("DT", $master["cust_send_time"],1) ; ?></td>
                                    <td><?php echo $master["cust_send_user"] ; ?></td>
                                    <td><?php echo get_table_Trade_storefee_bears("$master[storefee_bears]","name","") ; ?></td>
                                    <td><?php echo system_format("N3", $master["storefee_require"],1) ; ?></td>
                                    <td><?php echo system_format("DT", $master["storefee_start"],1) ; ?></td>
                                    <td><?php echo system_format("N3", $master["payment_require"],1) ; ?></td>
                                    <td><?php echo system_format("DT", $master["payment_expire"],1) ; ?></td>
                                    <td><?php echo get_table_Trade_confirm_status("$master[confirm_status]","name","") ; ?></td>
                                    <td  class=" abe-txtr "><?php echo system_format("F32", $master["confirm_payment"],1) ; ?></td>
                                    <td  class=" abe-txtr "><?php echo system_format("F32", $master["confirm_receive"],1) ; ?></td>
                                    <td  class=" abe-txtl "><?php echo $master["delivery_no"] ; ?></td>
                                    <td><?php echo system_format("D", $master["delivery_date"],1) ; ?></td>
                                    <td><?php echo system_format("DT", $master["delivery_expired"],1) ; ?></td>
                                    <td  class=" abe-txtl "><?php echo $master["delivery_company"] ; ?></td>
                                    <td  class=" abe-txtl "><div class="newline"><?php echo OverView($master["delivery_carinfo"],150,"...") ; ?></div></td>
                                    <td><?php echo get_table_Trade_delivery_type("$master[delivery_type]","name","") ; ?></td>
                                    <td  class=" abe-txtl "><div class="newline"><?php echo OverView($master["delivery_require"],150,"...") ; ?></div></td>
                                    <td><?php echo get_table_Trade_assign_status("$master[assign_status]","name","") ; ?></td>
                                    <td><?php echo system_format("DT", $master["assign_time"],1) ; ?></td>
                                    <td><?php echo $master["assign_user"] ; ?></td>
                                    <td  class=" abe-txtr "><?php echo system_format("F33", $master["assign_weight"],1) ; ?></td>
                                    <td  class=" abe-txtr "><?php echo system_format("N3", $master["assign_qty"],1) ; ?></td>
                                    <td  class=" abe-txtl "><?php echo $master["buyer_storecard_no"] ; ?></td>
                                    <td><?php echo get_table_Trade_buyer_storecard_allow("$master[buyer_storecard_allow]","name","") ; ?></td>
                                    <td  class=" abe-txtr "><?php echo system_format("F33", $master["act_weight"],1) ; ?></td>
                                    <td  class=" abe-txtr "><?php echo system_format("N3", $master["act_qty"],1) ; ?></td>
                                    <td><?php echo system_format("DT", $master["act_time"],1) ; ?></td>
                                    <td><?php echo $master["act_order"] ; ?></td>
                                    <td  class=" abe-txtr "><?php echo system_format("F33", $master["diff_weight"],1) ; ?></td>
                                    <td  class=" abe-txtr "><?php echo system_format("F32", $master["diff_amount"],1) ; ?></td>
                                    <td><?php echo get_table_Trade_interface_status("$master[interface_status]","name","") ; ?></td>
                                    <td><?php echo get_table_Trade_interface_send_status("$master[interface_send_status]","name","") ; ?></td>
                                    <td><?php echo system_format("DT", $master["interface_send_time"],1) ; ?></td>
                                    <td><?php echo system_format("N3", $master["interface_send_count"],1) ; ?></td>
                                    <td><?php echo system_format("DT", $master["interface_receive"],1) ; ?></td>
                                    <td  class=" abe-txtl "><div class="newline"><?php echo OverView($master["interface_result"],150,"...") ; ?></div></td>
                                    <td  class=" abe-txtl "><div class="newline"><?php echo OverView($master["customer_msg"],150,"...") ; ?></div></td>
                                    <td  class=" abe-txtl "><div class="newline"><?php echo OverView($master["buyer_msg"],150,"...") ; ?></div></td>
                                    <td  class=" abe-txtl "><div class="newline"><?php echo OverView($master["remarks"],150,"...") ; ?></div></td>
                                    <td><?php echo system_format("DT", $master["create_time"],1) ; ?></td>
                                    <td><?php echo system_format("DT", $master["modify_time"],1) ; ?></td>
                                 <td></td>
                                  </tr>
                                  <?php endforeach; ?>
                                <?php
                            endif;
                        else:
                            echo ""
                        ;endif; ?>
                        </tbody>
                      </table>
                    </form>
                  </div>
                </div>
              <?php endif; ?>

              <?php if ($search['_tab']=='jiaoyilianrizhi'): ?>
                <div class="table-box">
                  <div class="table-in">
                    <form id="<?php echo "$funcid"; ?>-Result"  action="<?php U('Chain/op'); ?>" method="post">
                      <input type="hidden" name="<?php echo "$funcid"; ?>-last-url" id="<?php echo "$funcid"; ?>-last-url" value="<?php echo $__last_url; ?>" />
                      <input type="hidden" name="funcid" value="<?php echo "$funcid"; ?>" />
                      <input type="hidden" name="pfuncid" value="<?php echo "$pfuncid"; ?>" />
                      <input type="hidden" name="id" value="<?php echo $search["id"]; ?>" />
                      <input type="hidden" name="_lastchanged" value="<?php echo $search["lastchanged"]; ?>" />
                      <table border="0" cellspacing="0" cellpadding="0" class="pub-table-par pub-table-par-tdc pub-t-faq">
                        <colgroup>
                          <col style="width: 40px ;"> <!-- 序号 -->
                          <col style="width: 80px ;"> <!-- 状态 -->
                          <col style="width: 150px ;"> <!-- 创建时间 -->
                          <col style="width: 100px ;"> <!-- 日志标题 -->
                          <col style="width: 80px ;"> <!-- 重量 -->
                          <col style="width: 80px ;"> <!-- 数量 -->
                          <col style="width: 80px ;"> <!-- 金额(元) -->
                          <col style="width: 100px ;"> <!-- 内容 -->
                          <col style="width: auto" >
                        </colgroup>
                        <tbody>
                          <tr>
                            <th>序号</th>
                            <th>状态</th>
                            <th>创建时间</th>
                            <th class="abe-txtl">日志标题</th>
                            <th class="abe-txtr">重量</th>
                            <th class="abe-txtr">数量</th>
                            <th class="abe-txtr">金额(元)</th>
                            <th class="abe-txtl">内容</th>
                           <th></th >
                          </tr>
                          <?php if(is_array($list)):
                            $i = 0;
                            $__LIST__ = $list;
                            if( count($__LIST__) == 0) :
                                echo "";
                            else:
                                foreach($__LIST__ as $key=>$master): $mod = ($i % 2 );++$i; ?>
                                  <tr <?php if($mod == "1"): ?>class="even"<?php endif; if($mod == "0"): ?>class="odd"<?php endif; ?>>
                                    <td><?php echo $i + ($page_size * ($p - 1)); ?></td>
                                    <td><?php echo get_table_Chain_status("$master[status]","name","") ; ?></td>
                                    <td><?php echo system_format("DT", $master["create_time"],1) ; ?></td>
                                    <td  class=" abe-txtl "><?php echo $master["subject"] ; ?></td>
                                    <td  class=" abe-txtr "><?php echo system_format("F33", $master["weight"],1) ; ?></td>
                                    <td  class=" abe-txtr "><?php echo system_format("N3", $master["qty"],1) ; ?></td>
                                    <td  class=" abe-txtr "><?php echo system_format("F32", $master["amount"],1) ; ?></td>
                                    <td  class=" abe-txtl "><div><?php echo OverView($master["content"],150,"...") ; ?></div></td>
                                 <td></td>
                                  </tr>
                                  <?php endforeach; ?>
                                <?php
                            endif;
                        else:
                            echo ""
                        ;endif; ?>
                        </tbody>
                      </table>
                    </form>
                  </div>
                </div>
              <?php endif; ?>



      <div class="blank5"></div>
   </div>

   <div class="data-oper" >
        <?php echo $page; ?>
      <div class="data-oper-in " >


          <?php if (isset($rights['order_edit']) && $rights['order_edit']): ?>
          <?php if (!$search['status']): ?>
               <input type="button" value="信息编辑" class="btn btn-blue mlg_10 " default-status="1" onclick="return _asr.popupFun('<?php echo U("/Home/Chain/index?func=edit_base&id=$search[id]") ; ?>', '<?php echo filterFuncId("/Home/Chain/index?func=edit_base&id=$search[id]","");?>'); " />
          <?php endif; ?>
          <?php endif; ?>



          <?php if (isset($rights['order_detail']) && $rights['order_detail']): ?>
          <?php if (!$search['status']): ?>
               <input type="button" value="明细编辑" class="btn btn-blue mlg_10 " default-status="1" onclick="return _asr.popupFun('<?php echo U("/Home/Chain/index?func=detail_edit&id=$search[id]") ; ?>', '<?php echo filterFuncId("/Home/Chain/index?func=detail_edit&id=$search[id]","");?>'); " />
          <?php endif; ?>
          <?php endif; ?>



          <?php if (isset($rights['toprocess']) && $rights['toprocess']): ?>
          <?php if (!$search['status']): ?>
               <input type="button" value="转待处理" class="btn btn-blue mlg_10 " default-status="1" onclick="return _asr.popupFun('<?php echo U("/Home/Chain/index?func=toprocess&id=$search[id]") ; ?>', '<?php echo filterFuncId("/Home/Chain/index?func=toprocess&id=$search[id]","");?>'); " />
          <?php endif; ?>
          <?php endif; ?>



          <?php if (isset($rights['todummy']) && $rights['todummy']): ?>
          <?php if ($search['status']=='1'): ?>
               <input type="button" value="待草稿" class="btn btn-org mlg_10 " default-status="1" onclick="return _asr.popupFun('<?php echo U("/Home/Chain/index?func=todummy&id=$search[id]") ; ?>', '<?php echo filterFuncId("/Home/Chain/index?func=todummy&id=$search[id]","");?>'); " />
          <?php endif; ?>
          <?php endif; ?>



          <?php if (isset($rights['close']) && $rights['close']): ?>
          <?php if ($search['status']=='1'): ?>
               <input type="button" value="转结束" class="btn btn-blue mlg_10 " default-status="1" onclick="return _asr.popupFun('<?php echo U("/Home/Chain/index?func=close&id=$search[id]") ; ?>', '<?php echo filterFuncId("/Home/Chain/index?func=close&id=$search[id]","");?>'); " />
          <?php endif; ?>
          <?php endif; ?>



          <?php if (isset($rights['closeback']) && $rights['closeback']): ?>
          <?php if ($search['status']=='2'): ?>
               <input type="button" value="结束退回" class="btn btn-org mlg_10 " default-status="1" onclick="return _asr.popupFun('<?php echo U("/Home/Chain/index?func=closeback&id=$search[id]") ; ?>', '<?php echo filterFuncId("/Home/Chain/index?func=closeback&id=$search[id]","");?>'); " />
          <?php endif; ?>
          <?php endif; ?>



          <?php if (isset($rights['grid']) && $rights['grid']): ?>
          <?php if (!$search['status']): ?>
               <input type="button" value="明细编辑" class="btn btn-blue mlg_10 " default-status="1" onclick="return _asr.popupFun('<?php echo U("/Home/Chain/index?func=grid&id=$search[id]") ; ?>', '<?php echo filterFuncId("/Home/Chain/index?func=grid&id=$search[id]","");?>'); " />
          <?php endif; ?>
          <?php endif; ?>

          <div class="abe-fr">


          <?php if (isset($rights['order_delete']) && $rights['order_delete']): ?>
          <?php if (!$search['status']): ?>
               <input type="button" value="记录删除" class="btn btn-org mrg_10 " default-status="1" onclick="return _asr.confirm('确认操作', '请确认是否进行 信息删除 操作?', '', '<?php echo U("/Home/Chain/index?func=delete&id=$search[id]") ; ?>','','<?php echo "$funcid"; ?>-Result'); " />
          <?php endif; ?>
          <?php endif; ?>



          <?php if (isset($rights['cancel']) && $rights['cancel']): ?>
          <?php if (($search['status']=='1' || $search['status']=='2' || $search['status']=='8')): ?>
               <input type="button" value="信息取消" class="btn btn-org mlg_10 " default-status="1" onclick="return _asr.popupFun('<?php echo U("/Home/Chain/index?func=cancel&id=$search[id]") ; ?>', '<?php echo filterFuncId("/Home/Chain/index?func=cancel&id=$search[id]","");?>'); " />
          <?php endif; ?>
          <?php endif; ?>

          </div>
      </div>
   </div>

   <div class="blank30"></div>
</div>
    <script>
        function <?php echo $funcid; ?>_chooseDate(o) {
            if($('.date').length>0)
                pickmeup('.date').destroy();
            $('.date').removeClass('date')
            $(o).addClass('date');
            pickmeup('.date', {
                format  : 'Y-m-d',
                date : $(o).val(),
                hide_on_select : true,
                locale : 'zh'
            }).show();
        }

        $('.calendar0,.calendar1').on('click',function(){
            <?php echo $funcid; ?>_chooseDate(this)
        });

        /***************************************************************************************/
        /* 前台页面初始化                                                                      */
        /***************************************************************************************/
        function <?php echo $funcid; ?>_init(_id){
            return ;
        }


    {:W('Summary/javascript',array('Chain'))}


    </script>


